import * as React from 'react';
import {RouteComponentProps} from "react-router-dom";
import {makeSence} from "./utils";

export class ReactRouterComponent<P, S> extends React.Component<RouteComponentProps<any, any> & P, S> {
    constructor(props: any) {
        super(props);
    }
    public routePath(path: string){
        return makeSence(path) ? `${this.props.match.path}${path}/` : this.props.match.path
    }
}
